package com.tanhua.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @author WDY
 * @date Created in 2021/3/1 11:17
 * @modified By  WDY in 2021/3/1 11:17
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "tanhua_sound")
public class Sound implements Serializable {
    /**
     * 主键id
     */
    @Id
    private ObjectId id;
    /**
     * 语音发布者id
     */
    @Indexed
    private Long userId;
    /**
     * 语音发布者 音频地址
     */
    private String soundUrl;
    /** 被接收状态，未被接收0，已被接收过1*/
    private Integer state;
}